package com.opo5.logisticsmanagement.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.opo5.logisticsmanagement.validationgroup.UpdateValida;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

//员工居住地
@Data
public class Address implements Serializable {

  @TableId(type = IdType.AUTO)
  @NotNull(groups = UpdateValida.class,message = "更新不能没有id")
  private Integer id;//主键，对应员工表id

  @NotBlank(message="省份不能为空")
  private String province;//省

  @NotBlank(message="市不能为空")
  private String city;//市

  @NotBlank(message="区/县不能为空")
  private String district;//区/县

  @NotBlank(message = "街道不能为空")
  private String street;//街道

}
